/***************************************************************************
 *   Copyright (C) 2004 by cyril dupuit                                    *
 *   cyrildupuit@hotmail.com                                               *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

//*****************************************************************************
// Nom du module : stdlib.h
// Description : Definition de la librairie standard de c (ANSI ou preqsque)
//*****************************************************************************
 
// Historique :
// 28/10/04 : Creation du module V1.0

#ifndef STDLIB_HEADER
#define STDLIB_HEADER

//*****************************************************************************

#ifndef TRUE
	#define TRUE 1
	#define FALSE 0
	#define ERROR -1
#endif

#ifndef NULL
	#define NULL ((void *) 0)
#endif

#define CHAR_BIT	8
#define CHAR_MAX	255
#define CHAR_MIN	0
#define SCHAR_MAX	127
#define SCHAR_MIN	-128

#define INT_MAX    	2147483647
#define INT_MIN		(-INT_MAX - 1)
#define UINT_MAX  	4294967295U

#define LONG_MAX	2147483647L
#define LONG_MIN	(-LONG_MAX - 1)
#define ULONG_MAX	4294967295UL

//*****************************************************************************

//*****************************************************************************

int rand(void);

//*****************************************************************************

void srand(unsigned int seed);

//*****************************************************************************
// But de la fonction : Convertir une chaine de caractere en entier long non
// signe
// Entree : 
//	pDigit : Pointeur sur la chaine de caractere
// Parametre retourne : Chaine de caractere convertie
//*****************************************************************************
unsigned long atoul(char * pDigit);

//*****************************************************************************

char * itoa (int val, char *buf, int radix);

//*****************************************************************************

char * ltoa (long val, char *buf, int radix);

//*****************************************************************************

char * ultoa (unsigned long val, char *buf, int radix);

long unsigned strtou(const char *s,int base,char **scan_end);

unsigned long strtoul(const char *nptr, char **endptr, int base);

long int strtoi(char *s,int base,char **scan_end);

double strtod(char *s,char **scan_end);

//*****************************************************************************

#endif
